update rules + shouldShowNumberKeyboard logic #610
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to report:
https://vtexhelp.zendesk.com/agent/tickets/1098502
Rewrite the logic for shouldShowNumberKeyboard.
It was added a logic for NaN mask type to cover the use case of UK that can have different patterns like:
SW1A 1AA – Buckingham Palace, London
W1A 1AA – BBC Broadcasting House, London
EC1A 1BB – Central London
M1 1AE – Manchester
B1 1AA – Birmingham
So in order not to change the default behavior (not defining a mask should have the numeric keyboard) we return the alphanumerical board for mask defined like NaN.